CFLAGS= -Wall

all: ../iffy.cgi ../iffyimg.cgi

../iffy.cgi: main.o glulx.o zcode.o gi_disp.o webglk
	gcc $(CFLAGS) -o ../iffy.cgi main.o glulx.o zcode.o gi_disp.o webglk/webglk.a
../iffyimg.cgi: iffyimg.o
	gcc $(CFLAGS) -o ../iffyimg.cgi iffyimg.o

main.o: main.c main.h
	gcc $(CFLAGS) -c $<
glulx.o: glulx.c glulx.h main.h
	gcc $(CFLAGS) -c $<
gi_disp.o: gi_disp.c
	gcc $(CFLAGS) -c $<
zcode.o: zcode.c zcode.h main.h
	gcc $(CFLAGS) -c $<

iffyimg.o: iffyimg.c
	gcc $(CFLAGS) -c $<

webglk: always
	cd webglk; make

always:
